package apiday02homework;

import java.util.Arrays;

public class SplitDemo {
    public static void main(String[] args) {
        /*
        String str = "asfasf12345abcde67890fsadfasd2342134";
        String[] data = str.split("[0-9]+");
        for (String d : data) {
            System.out.println(d);
        }
        System.out.println(data.length);

        String str1 = "192.168.10.1";
        String[] data1 = str1.split("\\.");
        System.out.println(Arrays.toString(data1));

        String str2 = "==123123==123=13====";
        String[] data2 = str2.split("=");
        System.out.println(Arrays.toString(data2));
        System.out.println(data2.length);

         */
        String str = "234abc13234abc1321";
        String[] data = str.split("[0-9]+");
        System.out.println(Arrays.toString(data));
        System.out.println(data.length);

        String str1 = "192.168.10.11";
        String[] data1 = str1.split("\\.");
        System.out.println(Arrays.toString(data1));
        System.out.println(data1.length);

        String str2 = "=123==2133===123======";
        String[] data2 = str2.split("=");
        System.out.println(Arrays.toString(data2));
        System.out.println(data2.length);
     }
}
